package com.stockz.equity.charting.view.widget;

import java.awt.Dimension;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.swing.JTextField;

import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

import com.stockz.equity.charting.view.toolbar.IndicatorToolBar;
import com.stockz.equity.pattern.Child;

@Component
public class SpanTextField extends JTextField implements Child,Ordered {
	private static final long serialVersionUID = -1291574340085644756L;

	@SuppressWarnings({ "rawtypes" })
	private List<Class> parentList = new ArrayList<Class>(1);
	
	public SpanTextField() {
		super("Span");
		//parentList.add(IndicatorToolBar.class);
		setPreferredSize(new Dimension(20,20));
		setText("20");
	}
	
	@SuppressWarnings("rawtypes")
	@Override
	public Collection<Class> getParents() {
		return parentList;
	}

	@Override
	public int getOrder() {
		return 1;
	}

}
